package com.cf.user.permission.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.*;
import java.util.Date;


@Entity
@Table(name = "systemRole")
@CModel(pages = {
        @CPage(title = "角色列表", path = "systemRole", templateName = "list.ftl", outPutName = "list.ftl"),
        @CPage(title = "角色", path = "systemRole", templateName = "add.ftl", outPutName = "add.ftl"),
        @CPage(title = "角色", path = "systemRole", templateName = "update.ftl", outPutName = "update.ftl")
})
public class SystemRole extends BaseEntity {


    @Column(name = "roleName")
    @CField(lab = "角色名字", search = true)
    private String roleName;

    @Column(name = "roleCode")
    @CField(lab = "角色码")
    private String roleCode;

    @Column(name = "createTime")
    @Temporal(TemporalType.TIMESTAMP)
    @CField(lab = "创建时间", show = false)
    private Date createTime = new Date();


    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
